package com.trkj.pojo;

import java.io.Serializable;
import javax.persistence.*;

import com.alibaba.fastjson.annotation.JSONField;

import java.math.BigDecimal;
import java.util.List;


/**
 * The persistent class for the QUESTION_TYPE database table.
 * 
 */
@Entity
@Table(name="QUESTION_TYPE")
@NamedQuery(name="QuestionType.findAll", query="SELECT q FROM QuestionType q")
public class QuestionType implements Serializable {
	private static final long serialVersionUID = 1L;

	@Id
	@Column(name="TEST_QUESTIONS")
	private String testQuestions;

	@Column(name="ANSWER_PARSE")
	private BigDecimal answerParse;

	@Column(name="KNOWLEDGE_POINT")
	private String knowledgePoint;

	@Column(name="NUMBER_OPTIONS")
	private BigDecimal numberOptions;

	@Column(name="OPTIONS_A")
	private String optionsA;

	@Column(name="OPTIONS_B")
	private String optionsB;

	@Column(name="OPTIONS_C")
	private String optionsC;

	@Column(name="OPTIONS_D")
	private String optionsD;

	@Column(name="PICTURE_MODE")
	private String pictureMode;

	@Column(name="QUES_ANSWER")
	private String quesAnswer;

	@Column(name="QUES_CONTENT")
	private String quesContent;

	@Column(name="QUES_DIFFICULTY")
	private String quesDifficulty;

	@Column(name="QUES_EXAM")
	private String quesExam;

	@Column(name="QUES_EXERCISE")
	private String quesExercise;

	@Column(name="QUES_FENSHU")
	private BigDecimal quesFenshu;

	@Column(name="QUES_PANDUAN")
	private BigDecimal quesPanduan;

	@Column(name="QUES_STATE")
	private String quesState;

	@Column(name="QUESTION_TYPE")
	private String questionType;

	//bi-directional many-to-one association to QuestionHhy
	@OneToMany(mappedBy="questionType")
	@JSONField(serialize=false)
	private List<QuestionHhy> questionHhies;

	//bi-directional many-to-one association to QuestionBank
	@ManyToOne
	@JoinColumn(name="QU_ID")
	private QuestionBank questionBank;

	public QuestionType() {
	}

	public String getTestQuestions() {
		return this.testQuestions;
	}

	public void setTestQuestions(String testQuestions) {
		this.testQuestions = testQuestions;
	}

	public BigDecimal getAnswerParse() {
		return this.answerParse;
	}

	public void setAnswerParse(BigDecimal answerParse) {
		this.answerParse = answerParse;
	}

	public String getKnowledgePoint() {
		return this.knowledgePoint;
	}

	public void setKnowledgePoint(String knowledgePoint) {
		this.knowledgePoint = knowledgePoint;
	}

	public BigDecimal getNumberOptions() {
		return this.numberOptions;
	}

	public void setNumberOptions(BigDecimal numberOptions) {
		this.numberOptions = numberOptions;
	}

	public String getOptionsA() {
		return this.optionsA;
	}

	public void setOptionsA(String optionsA) {
		this.optionsA = optionsA;
	}

	public String getOptionsB() {
		return this.optionsB;
	}

	public void setOptionsB(String optionsB) {
		this.optionsB = optionsB;
	}

	public String getOptionsC() {
		return this.optionsC;
	}

	public void setOptionsC(String optionsC) {
		this.optionsC = optionsC;
	}

	public String getOptionsD() {
		return this.optionsD;
	}

	public void setOptionsD(String optionsD) {
		this.optionsD = optionsD;
	}

	public String getPictureMode() {
		return this.pictureMode;
	}

	public void setPictureMode(String pictureMode) {
		this.pictureMode = pictureMode;
	}

	public String getQuesAnswer() {
		return this.quesAnswer;
	}

	public void setQuesAnswer(String quesAnswer) {
		this.quesAnswer = quesAnswer;
	}

	public String getQuesContent() {
		return this.quesContent;
	}

	public void setQuesContent(String quesContent) {
		this.quesContent = quesContent;
	}

	public String getQuesDifficulty() {
		return this.quesDifficulty;
	}

	public void setQuesDifficulty(String quesDifficulty) {
		this.quesDifficulty = quesDifficulty;
	}

	public String getQuesExam() {
		return this.quesExam;
	}

	public void setQuesExam(String quesExam) {
		this.quesExam = quesExam;
	}

	public String getQuesExercise() {
		return this.quesExercise;
	}

	public void setQuesExercise(String quesExercise) {
		this.quesExercise = quesExercise;
	}

	public BigDecimal getQuesFenshu() {
		return this.quesFenshu;
	}

	public void setQuesFenshu(BigDecimal quesFenshu) {
		this.quesFenshu = quesFenshu;
	}

	public BigDecimal getQuesPanduan() {
		return this.quesPanduan;
	}

	public void setQuesPanduan(BigDecimal quesPanduan) {
		this.quesPanduan = quesPanduan;
	}

	public String getQuesState() {
		return this.quesState;
	}

	public void setQuesState(String quesState) {
		this.quesState = quesState;
	}

	public String getQuestionType() {
		return this.questionType;
	}

	public void setQuestionType(String questionType) {
		this.questionType = questionType;
	}

	public List<QuestionHhy> getQuestionHhies() {
		return this.questionHhies;
	}

	public void setQuestionHhies(List<QuestionHhy> questionHhies) {
		this.questionHhies = questionHhies;
	}

	public QuestionHhy addQuestionHhy(QuestionHhy questionHhy) {
		getQuestionHhies().add(questionHhy);
		questionHhy.setQuestionType(this);

		return questionHhy;
	}

	public QuestionHhy removeQuestionHhy(QuestionHhy questionHhy) {
		getQuestionHhies().remove(questionHhy);
		questionHhy.setQuestionType(null);

		return questionHhy;
	}

	public QuestionBank getQuestionBank() {
		return this.questionBank;
	}

	public void setQuestionBank(QuestionBank questionBank) {
		this.questionBank = questionBank;
	}

}